package com.quiz.bis.controller;

import com.quiz.bis.domain.bo.BisPaperAutoBo;
import com.quiz.bis.domain.vo.BisPapersDetailVo;
import com.quiz.bis.service.IBisPaperAutoService;
import com.quiz.common.core.domain.R;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 试卷自动生成
 * @author ahuan
 */
@Tag(name = "试卷自动生成")
@RestController
@RequestMapping("/paper")
@RequiredArgsConstructor
public class BisPaperAutoController {

    private final IBisPaperAutoService baseService;

    /**
     * 试卷自动生成
     * @param request
     * @return
     */
    @PostMapping("/auto")
    public R<BisPapersDetailVo> autoGeneratePaper(@Validated @RequestBody BisPaperAutoBo request) {
        return baseService.autoGeneratePaper(request);
    }
}